package com.ocss.web.controller.system;

import com.ocss.common.core.controller.BaseController;
import com.ocss.common.core.domain.AjaxResult;

import com.ocss.system.domain.vo.LineChartVo;
import com.ocss.system.domain.vo.PanelGroupVo;
import com.ocss.system.service.IOcssCountService;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/system/count")
public class OcssCountController extends BaseController {

    @Resource
    private IOcssCountService ocssCountService;

    @GetMapping("/panel")
    public AjaxResult panel() {
        PanelGroupVo panelGroupVo = ocssCountService.countPanelGroup();

        return success(panelGroupVo);
    }

    @GetMapping("/lineChar")
    public AjaxResult lineChar() {
        LineChartVo lineChartVo = ocssCountService.countLineChart();

        return success(lineChartVo);
    }

}
